package com.examination.client.exception;

import com.examination.client.enums.ResultEnum;

/**
 * @author: XiaoDong
 * @date: 2021-10-24 19:15
 * @description:
 */
public class BusinessException extends Exception {

    private int code;
    private String message;

    public BusinessException() {
        this("This is blank message");
    }

    public BusinessException(String msg) {
        this(ResultEnum.FAIL.code, msg);
    }

    public BusinessException(int code, String msg) {
        super(msg);
        this.code = code;
        this.message = msg;
    }

    public int getCode() {
        return this.code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return this.message;
    }

    public void setMsg(String msg) {
        this.message = msg;
    }
}
